<?php echo form_open('report/searchstaff', array('class'=>'form-search'));?>
  <div class="input-append">
    <?php echo form_dropdown('TeamID',$teams);?>
    <?php echo form_hidden('endprobation','endprobation');?>
    <button type="submit" class="btn">Search</button>
  </div>
<?php echo form_close();?>
<?php 
if (count($profiles)){
?>
<table class="table table-bordered table-striped table-hover staff-profile">
  <caption><h4><?php echo $title;?></h4></caption>
   <thead>
	    <tr>
	    	<th>First Name</th>
            <th>Last Name</th>
            <th>Position</th>
            <th>Team</th>
            <th>Location</th>
            <th>Phone</th>
            <th>Skype ID</th>
            <th>Email</th>
            <th>End Probation Date</th>
	    </tr>
	</thead>
  <tbody>
  	<?php 
		foreach ($profiles as $key => $list){
		    if($list['UserId'] != $_SESSION['uid']){
    			echo "<tr valign='top'>\n";
    			echo "<td>".$list['FirstName']."</td>\n";
                echo "<td>".$list['LastName']."</td>\n";
                echo "<td>".$list['Title']."</td>\n";
                echo "<td>".$list['TeamName']."</td>\n";
                echo "<td>".$list['Location']."</td>\n";
                echo "<td>".$list['PhoneNumber']."</td>\n";
                echo "<td>".$list['SkypeID']."</td>\n";
                echo "<td>".$list['Email']."</td>\n";
                echo "<td>".substr($list['EndProbation'],0,10)."</td>\n";
    			echo "</tr>\n";
            }
		}
  	?>
  </tbody>
</table>
<?php }?>